# $Id: PKGBUILD 75970 2012-09-07 12:07:38Z lcarlier $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: Vinay S Shastry <vinayshastry@gmail.com>

pkgname=freemind
pkgver=0.9.0
pkgrel=3
pkgdesc="A Java mindmapping tool"
arch=('any')
url="http://sourceforge.net/projects/freemind"
license=('GPL')
depends=('java-runtime' 'desktop-file-utils' 'libxtst')
makedepends=('unzip')
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-bin-max-$pkgver.zip
        $pkgname.png
        $pkgname.desktop
        $pkgname.run)
sha256sums=('5d6a6871149ed6ec5a99581ecc258a71ef9e2d44c5cb13125ab278b7d3e7d63c'
            '39ec1dc88a1081058faef38b5ea48ca8c0b6ee6a6b397a216ce2f7b508b1ad61'
            'f2b93d860eb462f78225473fdeffc36df527d8b700fcca1b58eeafd291d46f82'
            '7b02f0af26c6c9377011c0a6f0299dc6bbdbb69d17a1506cf88e7063e1ad2f6c')

package() {
  cd ${srcdir}

  for file in $(find lib plugins -type f); do
	  install -Dm644 $file ${pkgdir}/usr/share/freemind/$file
  done

  install -Dm755 ${srcdir}/freemind.run ${pkgdir}/usr/bin/freemind
  install -Dm755 ${srcdir}/freemind.sh ${pkgdir}/usr/share/freemind/freemind.sh
  install -Dm644 ${srcdir}/patterns.xml ${pkgdir}/etc/freemind/patterns.xml
  #install -Dm644 ${srcdir}/user.properties ${pkgdir}/usr/share/freemind/user.properties
  
  install -d ${pkgdir}/usr/share/freemind/accessories
  install -Dm644 ${srcdir}/accessories/* ${pkgdir}/usr/share/freemind/accessories/
  install -Dm644 ${srcdir}/doc/freemind.mm ${pkgdir}/usr/share/freemind/doc/freemind.mm

# icon and .desktop file
  install -Dm644 ${srcdir}/freemind.desktop ${pkgdir}/usr/share/applications/freemind.desktop
  install -Dm644 ${srcdir}/freemind.png ${pkgdir}/usr/share/pixmaps/freemind.png
}
